<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>RCSHS QuRRA</title></head>

<link rel=stylesheet href="../css-layouts/themes/defaulttheme.css" type="text/css">
<link rel=stylesheet href="../css-layouts/headlinks.css" type="text/css">
<link rel=stylesheet href="../css-layouts/imglinks.css" type="text/css">

</head>

<body>

<div id="mainhead"><br><br><br></div>

<?php 

 require_once("../lib/sha256.php");

 mysql_connect("localhost", "root", "") or die(mysql_error()); 
 mysql_select_db("pinfdbshs") or die(mysql_error()); 

?>

<p class="leftnav">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logged in as: <?php echo $_COOKIE["parentinformerprcshs"]; ?>
</p>

<p class="rightnav">
<a href="../settings">Settings</a> || <a href="../redirout.php">Logout</a>
</p>

<hr style="clear: both;"><br>

<center><img src="../img/header-qurra.png" style="height: 100px" alt="QuRRA"></center>
<br><br>

<center><font id="heading">RECORD RESULTS</font></center>

<?php

 $thesn = sha256($info['sid']);
 $theyear = date('Y', strtotime('Y -1 year'));
 $yrs = array('frst', 'secnd', 'thrd', 'frth');
 $arryr = 0;

 while($arryr<4) {
  $snquery = mysql_query("SELECT * FROM " .$yrs[$arryr]. "yr".$theyear." WHERE mysn='".$thesn."'") or die(mysql_error());
  if($thefetching=mysql_fetch_array($snquery)) {
   $lnmcut = substr($thefetching[4], 0, 1);
	 
?>

<br>
NAME: <?php echo $thefetching[2] . ", " . $thefetching[3] . " " . $lnmcut . "."; ?>
<br>
STUDENT ID: <?php echo $info['sid']; ?>
<br>
<br>
<center>TABLE OF GRADES</center>
<br>
<table border=1 align=center>

<tr>
<th>ENGLISH</th>
<th>FILIPINO</th>
<th>ECONOMICS</th>
<th>PHYSICS</th>
<th>ADVANCED CHEMISTRY</th>
<th>CALCULUS</th>
<th>RESEARCH</th>
<th>TLE</th>
<th>PE</th>
<th>HEALTH</th>
<th>MUSIC</th>
<th>VALUES</th>
</td>

<tr>

<?php

   for($x=1;$x<=mysql_num_rows($snquery);$x++) {
    for($y=5;$y<mysql_num_fields($snquery);$y++) {
     echo "<td>$thefetching[$y]</td>";
    }
   }
   break;
  }
  $arryr += 1;
 }

?>

</tr></table>

<?php

 if($arryr>=4) {
  echo "<br>No academic records are associated with this account.<br><br>";
  echo "<b>Student ID:</b> ". $info['sid'] ."<br><br>";
  echo "Please contact the administrators to enlist or correct your student ID.<br>";
  echo "Thank you!<br>";
 }

}

?>

<br>
<b>NOTE:</b>
<br>
All academic records written herein are unofficial. The grades certified<br>
in the report card issued by the school is deemed official.

<div class="footnav" align=center>

<hr>


<a href="index.php">Main Page</a> ||
<a href="#">Help</a> ||
<a href="../externalaffairs/links.php">Links</a> ||
<a href="#">About</a>
<br>

<span id="copyme">
&copy; 2011 Roosevelt College Science High School. All rights reserved.
</span>

</div>
</body>


</html>